package com.tbfs.admin.service.sdk.impl;

import java.util.List;

import com.tbfs.admin.dao.RoleDAO;
import com.tbfs.admin.service.sdk.IRoleService;
import com.tbfs.admin.vo.Role;

public class RoleServiceImpl implements IRoleService{
	
	private RoleDAO roleDao;

	public RoleDAO getRoleDao() {
		return roleDao;
	}

	public void setRoleDao(RoleDAO roleDao) {
		this.roleDao = roleDao;
	}

	public Role getRole(Role bean) {
		return (Role) roleDao.selectByEntityId(bean);
	}

	public int modify(Role role) {
		// TODO Auto-generated method stub
		return roleDao.updateByPrimaryKeySelective(role);
	}

	public void add(Role role) {
		roleDao.insert(role);
		
	}

	public void destory(Role role) {
		roleDao.deleteByPrimaryKey(role);
		
	}

	public List getRoleList(Role bean) {
		// TODO Auto-generated method stub
		return roleDao.queryBySelective(bean);
	}

	public Integer getRoleListCounts(Role bean) {
		// TODO Auto-generated method stub
		return roleDao.queryCountBySelective(bean);
	}

}
